//
//  SSNetworkManager.h
//  starspaceVR
//
//  Created by 曹端芹 on 17/9/12.
//  Copyright © 2017年 starspace. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>


typedef NS_ENUM(NSUInteger, RequestMethod){
    RequestMethodGET,
    RequestMethodHTTP,
    RequestMethodHTTPS,
};

typedef void(^RequestSuccess)(NSDictionary *responseDict);
typedef void(^RequestFailure)(NSError *error);

@interface SSNetworkManager : NSObject


+ (NSURLSessionDataTask *)postWithAPIString:(NSString *)APIString parameters:(NSDictionary *)parameters success:(RequestSuccess)success failure:(RequestFailure)failure;

+ (NSURLSessionDataTask *)uploadFilesWithURLString:(NSString *)URLString parameters:(NSDictionary *)parameters constructingBodyWithBlock:(void(^)(id <AFMultipartFormData> formData))block success:(RequestSuccess)success failure:(RequestFailure)failure;

+ (NSURLSessionDataTask *)getWithURLString:(NSString *)URLString parameters:(NSDictionary *)parameters success:(RequestSuccess)success failure:(RequestFailure)failure;

@end
